
    // Dog.java
    class Dog{
        String name;
        int age;
        float weight;
        public void eat(){
            System.out.println(name + "正在吃饭");
        }
        public void sleep(){
            System.out.println(name + "正在睡觉");
        }
        void Bark(){

            System.out.println(name + "汪汪汪~~~");
        }
    }
    // Cat.Java
     class Cat{
        String name;
        int age;
        float weight;
        public void eat(){
            System.out.println(name + "正在吃饭");
        }
        public void sleep()
        {
            System.out.println(name + "正在睡觉");
        }
        void mew(){
            System.out.println(name + "喵喵喵~~~");
        }
    }
    public class Test {

    public static void main(String[] args) {
        Dog dog=new Dog();
        dog.name="黑子";
        dog.age=9;
        dog.weight=9;
        dog.eat();
        dog.sleep();
        dog.Bark();

        System.out.println("--------------分割线");
        Cat cat=new Cat();
        cat.name="咪咪";
        cat.age=6;
        cat.weight=6;
        cat.eat();
        cat.sleep();
        cat.mew();



    }
}
